package de.bastian.hinterleitner.adaptersviews;

import java.util.ArrayList;

import android.content.Context;
import android.widget.BaseAdapter;
import de.bastian.hinterleitner.tools.Entry;

/**
 *
 * @author basti
 */
public abstract class BasicAdapter  extends BaseAdapter{
    
    public ArrayList<Entry> entries;
    protected Context context;

    public int getCount() {
        return entries.size();
    }

    public Entry getItem(int i) {
        return entries.get(i);
    }
    
    public ArrayList<Entry> getItems() {
        return entries;
    }

    public long getItemId(int i) {
        return entries.get(i).getId();
    }
    
    public void setItems(ArrayList<Entry> list){
        entries = list;
        notifyDataSetChanged();
    }
    
    @Override
    public void notifyDataSetChanged() {
    	super.notifyDataSetChanged();
    }
}
